<?php
$caption = 'Location List';
$this->pageTitle = $caption;

if (count($rows)>0) {
?>
<div class="row-fluid">
	<div class="span12">
		<table class="table table-striped table-hover">
			<tbody>
<?php foreach ($rows as $k => $v) {
	$location_string = implode(',', $v['location']);
?>
<tr>
	<td>
		<input id="address-radio-<?php echo $k; ?>" name="address-radio" type="radio" value="<?php echo $location_string; ?>" />
		<label for="address-radio-<?php echo $k; ?>"><?php echo $v['address']; ?></label>
	</td>
</tr>
<?php
} ?>
			</tbody>
		</table>
	</div>
</div>
<?php } else { ?>
<div class="row-fluid">
	<div class="span12">
		<div class="well well-large gray">
			<h3>No location information.</h3>
			<p class="">You have to fill up your local address. <a href="<?php echo Yii::app()->createUrl('/profile/form', array('ref'=>'no_location')); ?>">Click here</a>.</p>
		</div>
	</div>
</div>
<?php } ?>